//哈希表
var firstMissingPositive = function(nums) {
    let map = new Map()
    let num = 1
    for(let i=0;i<nums.length;i++){
        map.set(nums[i])
    }

    while(true){
        if(!(map.has(num))){
            return num
        }
        num++
    }
};